package pojo;


import java.util.Date;
import java.util.Objects;

public class CheckOutRecord {
    private int stuId;
    private int dormId;
    private int bedId;
    private Date actual_cherk_out_time;
    private String reason;

    public CheckOutRecord() {
    }

    public CheckOutRecord(int stuId, int dormId, int bedId, Date actual_cherk_out_time, String reason) {
        this.stuId = stuId;
        this.dormId = dormId;
        this.bedId = bedId;
        this.actual_cherk_out_time = actual_cherk_out_time;
        this.reason = reason;
    }

    public int getStuId() {
        return stuId;
    }

    public void setStuId(int stuId) {
        this.stuId = stuId;
    }

    public int getDormId() {
        return dormId;
    }

    public void setDormId(int dormId) {
        this.dormId = dormId;
    }

    public int getBedId() {
        return bedId;
    }

    public void setBedId(int bedId) {
        this.bedId = bedId;
    }

    public Date getActual_cherk_out_time() {
        return actual_cherk_out_time;
    }

    public void setActual_cherk_out_time(Date actual_cherk_out_time) {
        this.actual_cherk_out_time = actual_cherk_out_time;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CheckOutRecord that = (CheckOutRecord) o;
        return stuId == that.stuId &&
                dormId == that.dormId &&
                bedId == that.bedId &&
                Objects.equals(actual_cherk_out_time, that.actual_cherk_out_time) &&
                Objects.equals(reason, that.reason);
    }

    @Override
    public int hashCode() {
        return Objects.hash(stuId, dormId, bedId, actual_cherk_out_time, reason);
    }

    @Override
    public String toString() {
        return "CheckOutRecord{" +
                "stuId=" + stuId +
                ", dormId=" + dormId +
                ", bedId=" + bedId +
                ", actual_cherk_out_time=" + actual_cherk_out_time +
                ", reason='" + reason + '\'' +
                '}';
    }
}
